<?php
namespace app\admin\controller;
use app\admin\controller\Common;
use think\Db;
use think\Controller;
class Homepage extends Common
{

//佣金管理
    public function commission(){

        return $this->fetch();
    }

//广告投放
    public function advertising(){
        return $this->fetch();
    }

    public function edit_advertising(){

        $data = input();
    
        if($data['id']){
            $data['update_at'] = time();
            $res = db('show')->updata($data);
        }else{
            $data['created_at'] = time();
            $res = db('show')->insert($data);
        }

        

        if($res){
            return json(['msg'=>'修改成功']);            
        }
        return json(['msg'=>'修改失败']);

    }

//关于陶艺
    public  function ty_about(){
        return $this->fetch();
    }

//链接管理
    public function link(){
        return $this->fetch();
    }



?>